﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'V' AND name = 'Repository_View')
BEGIN
  DROP  View Repository_View
END
GO
CREATE View Repository_View 
AS
   SELECT A.*,B.EntName EnterpriseName,B.Addess FROM Repository A 
JOIN Hazard B ON A.EnterpriseID=B.EntID
GO
GO